<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    // let state = {
    //     small: Symbol(),
    //     middle: Symbol(),
    //     large: Symbol()
    // }

    // let now = state.middle;
    
    // if(now === state.middle){
    //     console.log("中")
    // }else if(now === state.small){
    //     console.log("小")
    // }else if(now === state.large){
    //     console.log("大")
    // }

    // ========

    // const s1 = Symbol();
    // const s2 = Symbol();
    // console.log(s1);
    // console.log(s2);
    // console.log(typeof s2);
    
    // console.log(s2 === s1);

    // ========

    const s = Symbol("a");

    const obj = {
        a:"hello world",
        [s]:"啊哈哈"
    }

    obj[s] = "你好";

    console.log(obj);
    console.log(obj.a);
    console.log(obj[Symbol("a")]);
    console.log(obj[s]);

</script>
</html>